package com.sk.sourcecircle.activity.main;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.ViewPager;

import com.sk.sourcecircle.R;
import com.sk.sourcecircle.adapter.ViewPagerAdapter;
import com.sk.sourcecircle.base.BaseActivity;

import butterknife.BindView;

/**
 * Created by sk on 2018/1/11.
 */

public class ViewPagerActivity extends BaseActivity {
    @BindView(R.id.my_pager)
    ViewPager myPager;

    @Override
    protected int getContentView() {
        return R.layout.activity_view_pager;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        int[] ids = new int[]{R.mipmap.view_pager1,R.mipmap.view_pager2,R.mipmap.view_pager3};
        ViewPagerAdapter viewPagerAdapter = new ViewPagerAdapter(ids,mContext,this);
        myPager.setAdapter(viewPagerAdapter);
    }

    @Override
    public void sure() {
        super.sure();
        Intent intent = new Intent(mContext,MainActivity.class);
        startActivity(intent);
        finish();
    }
}
